package hu.szyrt.bug.views;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.ImageView;

public class PlaceImageView extends ImageView {

	private Bitmap stampImage1 = null,
				   stampImage2 = null;
	
	
	
	private Paint paint = new Paint();
	
	// Construct ---------------------------------
	public PlaceImageView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public PlaceImageView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public PlaceImageView(Context context) {
		super(context);
	}
	
	
	// Methods ----------------------------------
	@Override
	protected void onDraw(Canvas canvas) {		
		super.onDraw(canvas);
		
		if(stampImage1 != null){
			canvas.drawBitmap(
					stampImage1,
					stampImage1.getWidth() - 3,
					getHeight() - stampImage1.getHeight() - 2,
					paint
					);
		}
		
		if(stampImage2 != null){
			canvas.drawBitmap(
					stampImage2,
					0,
					getHeight() - stampImage2.getHeight() - 10,
					paint
					);
		}
		
	}	
	
	// Setters ----------------------------------
	public void setStampImage1(Bitmap stampImage1) {
		this.stampImage1 = stampImage1;
	}
	
	public void setStampImage2(Bitmap stampImage2) {
		this.stampImage2 = stampImage2;
	}
	
	
	

}
